<%@ page import="java.util.ArrayList" %>
<%@ page import="bean.Student" %>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>查看学生列表</title>
</head>
<body>
    <table width="600px" border="2px">
        <tr>
            <th>学生姓名</th>
            <th>学生年龄</th>
            <th>学生成绩</th>
        </tr>
        <% ArrayList<Student> studens = (ArrayList<Student>) session.getAttribute("students");
            for (Student stu : studens) {
        %>
        <tr align="center">
            <td><%= stu.getUsername()%></td>
            <td><%= stu.getAge()%></td>
            <td><%= stu.getScore()%></td>
        </tr>
        <%}%>
    </table>
</body>
</html>
